package com.yzd.learnjava.enumerated;

import com.yzd.learnjava.util.Enums;
import com.yzd.learnjava.util.Print;

public class RoShamBo {
	public static <T extends Competitor<T>> void match(T a , T b) {
		Print.print(a + " vs. " + b + ": " + a.compete(b));
	}
	
	public static <T extends Enum<T> & Competitor<T>> void play(Class<T> rsb, int size) {
		for(int i = 0 ; i < size ; i++) {
			match(Enums.random(rsb), Enums.random(rsb));
		}
	}
}
